package com.example.chronicdisease.response;

public class ChronicDiseaseException extends RuntimeException{ //不用try-catch的异常类型
    private Integer status;  //异常的编码
    private String desc;//异常的描述信息

    public ChronicDiseaseException(Integer status, String desc){
        this.status=status;
        this.desc=desc;
    }

    public ChronicDiseaseException(){

    }

    public ChronicDiseaseException(ChronicDiseaseExceptionEnum exceptionEnum){
        this.desc=exceptionEnum.getDesc();
        this.status=exceptionEnum.getStatus();
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
